﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="Statistics.aspx.cs" Inherits="ITSupportPlatform.Statistics" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <form id="form1" runat="server">
    <div style="width: 100%; height: 100%; margin: 0px;">
        <div class="easyui-panel" title="统计查询" style="padding: 3px; background: #fafafa;
            height: 550px;" data-options="iconCls:'icon-save',closable:false,   
                collapsible:false,minimizable:false,maximizable:false">
            <table width="90%" style="margin-left: 30px; margin-top: 10px; margin-bottom: 10px;">
                <tr>
                    <td style="height: 34px; width: 80px;" align="left" valign="middle">
                        开始时间：
                    </td>
                    <td style="height: 34px; width: 180px;" valign="middle">
                        <input id="TBStart" class="easyui-datetimebox" data-options="showSeconds:false" style="width: 150px" />
                    </td>
                    <td style="height: 34px; width: 80px;" align="right" valign="middle">
                        结束时间：
                    </td>
                    <td style="height: 34px; width: 180px;" valign="middle">
                        <input id="TBEnd" class="easyui-datetimebox" data-options="showSeconds:false" style="width: 150px" />
                    </td>
                    <td rowspan="2" valign="top" style=" width:600px;">
                        <input id="ButSearch" type="button" value="搜索" 
                            style="height: 42px; width: 112px" /></td>
                </tr>

                <tr>
                    <td style="width: 80px; height: 34px" align="left" valign="middle">
                        系统名称：
                        <%--              <asp:DropDownList ID="DDLProcesser" runat="server"></asp:DropDownList>--%>
                    </td>
                    <td style="width: 180px; height: 34px" valign="middle">
                        <asp:DropDownList ID="DDLSystem" runat="server" DataSourceID="ODSSys" DataTextField="ProblemClassifyName"
                            DataValueField="ProblemClassifyValue" Width="150px">
                        </asp:DropDownList>
                    </td>
                    <td style="width: 80px; height: 34px" align="right" valign="middle">
                        问题分类：
                    </td>
                    <td style="height: 34px; width: 180px;" valign="middle">
                        <select id="DDLProbList" Width="150px" style="width: 150px">
                            <option value="">--请选择--</option>
                        </select>
                    </td>
                </tr>
                <tr>
                    <td style="height: 34px; width: 80px;" align="left" valign="middle">
                        处理人：
                    </td>
                    <td style="height: 34px; width: 180px;" valign="middle">
                        <asp:DropDownList ID="DDLProcesser" runat="server" DataSourceID="ODSUsers" DataTextField="Name"
                            DataValueField="ID" Width="150px">
                        </asp:DropDownList>
                    </td>
                    <td style="height: 34px; width: 80px;" align="right" valign="middle">
                    </td>
                    <td style="height: 34px; width: 180px;" valign="middle">
                        &nbsp;</td>
                    <td style="height: 34px">
                    </td>
                </tr>                
                <tr>
                    <td colspan="5">
                    <HR style="FILTER: alpha(opacity=100,finishopacity=0,style=3)" width="80%" SIZE=3>
                        <div id="TBSearchResult" style="margin-top: 10px; margin-bottom: 10px; "></div>

                        <div class="tabletd">
                            <table class="easyui-datagrid" id="GroupFinishProcessWorks" data-options="loadMsg:'正在加载数据，请稍后',<%--height:310,--%>
				rownumbers:true,
				singleSelect:true,
				autoRowHeight:false,
				pagination:true,
				pageSize:10">
                                <thead>
                                    <tr>
                                        <th data-options="field:'ProcName'">
                                            标题
                                        </th>
                                        <%-- <th data-options="field:'Status'">状态</th>--%>
                                        <th data-options="field:'CreatorName'">
                                            请求人
                                        </th>
                                        <th data-options="field:'PartName'">
                                            处理人
                                        </th>
                                        <th data-options="field:'ProcID'">
                                            编号
                                        </th>
                                        <th data-options="field:'StartTime'">
                                            提交时间
                                        </th>
                                        <th data-options="field:'EndTime'">
                                            处理时间
                                        </th>
                                        <th data-options="field:'sname'">
                                            所属系统
                                        </th>
                                        <th data-options="field:'pname'">
                                            问题类型
                                        </th>
                                    </tr>
                                </thead>
                            </table>
                        </div>
                    </td>
                </tr>
            </table>
        </div>
    </div>
    <asp:ObjectDataSource ID="ODSUsers" runat="server" SelectMethod="GetInfomationUserList"
        TypeName="ITSupportPlatform.Handler.GroupFinishTaskSearchHander"></asp:ObjectDataSource>
    <asp:ObjectDataSource ID="ODSSys" runat="server" SelectMethod="GetSystemTypes" TypeName="ITSupportPlatform.Handler.GroupFinishTaskSearchHander">
    </asp:ObjectDataSource>
    <script type="text/javascript" src="Resource/js/hander.js"></script>
    <script type="text/javascript">
        $(function () {
            var ddlsysName = "#<%= DDLSystem.ClientID %>";
            var ddlperson = "#<%= DDLProcesser.ClientID %>";

            $(ddlsysName).change(function () {
                var datas = new Object();
                datas.Parms = new Array();
                datas.Parms[0] = $(ddlsysName).val();
                datas.RequestName = "ITsupport_GetITSupportType";

                datas = window.JSON.stringify(datas);
                $.ajax({
                    async: false,
                    type: "Post",
                    contentType: "application/json;charset=utf-8",
                    dataType: "json",
                    url: '/springservice.ashx?op=GetListRequest',
                    data: datas,
                    success: function (data) {
                        if (data.returnValue == true) {
                            var responseData = data.MainData;
                            var showData = "";
                            var i = 0;
                            $("#DDLProbList").empty();
                            var content = "<option value=''>--请选择--</option>";

                            $.each(data.MainData, function (i, n) {
                                content += "<option value='" + n.ProblemClassifyValue + "'>" + n.ProblemClassifyName + "</option>";
                            });
                            //alert(showData);
                            $('#DDLProbList').html(content);

                        }
                        else {
                            alert('错误：' + data.message);
                        }
                    },
                    error: function (data) {
                        alert("errorText:" + data.message);
                    }
                });
            });

            SearchStatisticResult(ddlperson, ddlsysName);

            $("#ButSearch").click(function () {
                SearchStatisticResult(ddlperson, ddlsysName);
            });
        });
    </script>
    </form>
</asp:Content>
